import java.math.BigInteger;


public class P25 {
	public static void main(String[] args) {
		BigInteger a = new BigInteger("1");
		BigInteger b = new BigInteger("1");
		
		int index = 3;
		while (true) {
			BigInteger c = a.add(b);			
			//System.out.println(c);
			a = b;
			b = c;
			
			
			//System.out.println(index + ":" + c);
			int digits = 1000;
			BigInteger d = new BigInteger("10").pow(digits - 1);
			
			if (c.divide(d).longValue() > 0) {
				System.out.println(c);
				break;
			}
			index++;
		}
		
		System.out.println(index);
		
	}
}
